
<form name="editForm" role="form" novalidate ng-submit="vm.save()" show-validation>

    <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal" aria-hidden="true"
                ng-click="vm.clear()">&times;</button>
        <h4 class="modal-title" id="mySysMessageLabel" translate="weiyouquApp.sysMessage.home.createOrEditLabel">Create or edit a Sys Message</h4>
    </div>
    <div class="modal-body">
        <jhi-alert-error></jhi-alert-error>
        <div class="form-group" ng-show="vm.sysMessage.id">
            <label for="id" translate="global.field.id">ID</label>
            <input type="text" class="form-control" id="id" name="id"
                    ng-model="vm.sysMessage.id" readonly />
        </div>
        <div class="form-group">
            <label class="control-label" translate="weiyouquApp.sysMessage.title" for="field_title">Title</label>
            <input type="text" class="form-control" name="title" id="field_title"
                    ng-model="vm.sysMessage.title"
                    required />
            <div ng-show="editForm.title.$invalid">
                <p class="help-block"
                    ng-show="editForm.title.$error.required" translate="entity.validation.required">
                    This field is required.
                </p>
            </div>
        </div>
        <div class="form-group">
            <label class="control-label" translate="weiyouquApp.sysMessage.content" for="field_content">Content</label>
            <input type="text" class="form-control" name="content" id="field_content"
                    ng-model="vm.sysMessage.content"
                    required />
            <div ng-show="editForm.content.$invalid">
                <p class="help-block"
                    ng-show="editForm.content.$error.required" translate="entity.validation.required">
                    This field is required.
                </p>
            </div>
        </div>
        <div class="form-group">
            <label class="control-label" translate="weiyouquApp.sysMessage.url" for="field_url">Url</label>
            <input type="text" class="form-control" name="url" id="field_url"
                    ng-model="vm.sysMessage.url"
                     />
        </div>
        <div class="form-group">
            <label class="control-label" translate="weiyouquApp.sysMessage.type" for="field_type">Type</label>
            <input type="number" class="form-control" name="type" id="field_type"
                    ng-model="vm.sysMessage.type"
                    required />
            <div ng-show="editForm.type.$invalid">
                <p class="help-block"
                    ng-show="editForm.type.$error.required" translate="entity.validation.required">
                    This field is required.
                </p>
                <p class="help-block"
                    ng-show="editForm.type.$error.number" translate="entity.validation.number">
                    This field should be a number.
                </p>
            </div>
        </div>
        <div class="form-group">
            <label class="control-label" translate="weiyouquApp.sysMessage.status" for="field_status">Status</label>
            <input type="number" class="form-control" name="status" id="field_status"
                    ng-model="vm.sysMessage.status"
                    required />
            <div ng-show="editForm.status.$invalid">
                <p class="help-block"
                    ng-show="editForm.status.$error.required" translate="entity.validation.required">
                    This field is required.
                </p>
                <p class="help-block"
                    ng-show="editForm.status.$error.number" translate="entity.validation.number">
                    This field should be a number.
                </p>
            </div>
        </div>
        <div class="form-group">
            <label class="control-label" translate="weiyouquApp.sysMessage.time" for="field_time">Time</label>
                <div class="input-group">
                    <input id="field_time" type="text" class="form-control" name="time" datetime-picker="{{dateformat}}" ng-model="vm.sysMessage.time" is-open="vm.datePickerOpenStatus.time"
                    required  />
                    <span class="input-group-btn">
                        <button type="button" class="btn btn-default" ng-click="vm.openCalendar('time')"><i class="glyphicon glyphicon-calendar"></i></button>
                    </span>
                </div>
            <div ng-show="editForm.time.$invalid">
                <p class="help-block"
                    ng-show="editForm.time.$error.required" translate="entity.validation.required">
                    This field is required.
                </p>
                <p class="help-block"
                    ng-show="editForm.time.$error.ZonedDateTimelocal" translate="entity.validation.ZonedDateTimelocal">
                    This field should be a date and time.
                </p>
            </div>
        </div>

    </div>
    <div class="modal-footer">
        <button type="button" class="btn btn-default" data-dismiss="modal" ng-click="vm.clear()">
            <span class="glyphicon glyphicon-ban-circle"></span>&nbsp;<span translate="entity.action.cancel">Cancel</span>
        </button>
        <button type="submit" ng-disabled="editForm.$invalid || vm.isSaving" class="btn btn-primary">
            <span class="glyphicon glyphicon-save"></span>&nbsp;<span translate="entity.action.save">Save</span>
        </button>
    </div>
</form>
